import request from '@/utils/request'

export default {

    getTeacherListPage(page, limit, teacherQuery) {
        return request({
            url: `/serviceedu/edu-teacher/pageTeacherCondition/${page}/${limit}`,
            method: 'post',
            //teacherQuery条件对象，后端使用RequestBody获取对象
            data: teacherQuery
        })
    },
    delTeacher(id) {
        return request({
            url: `/serviceedu/edu-teacher/del/${id}`,
            method: 'delete',
            //teacherQuery条件对象，后端使用RequestBody获取对象
            data: id
        })
    },
    addTeacher(teacher){
        return request({
            url: `/serviceedu/edu-teacher/addTeacher`,
            method: 'post',
            //teacherQuery条件对象，后端使用RequestBody获取对象
            data: teacher
        })
    },
    updateById(teacher){
        return request({
            url: `/serviceedu/edu-teacher/updateTeacher`,
            method: 'post',
            //teacherQuery条件对象，后端使用RequestBody获取对象
            data: teacher
        })
    },
    getTeacherInfo(id){
        return request({
            url: `/serviceedu/edu-teacher/getTeacher/${id}`,
            method: 'get',
            params: id
        })
    }
}
